package com.zhika.zishi.fragments.set;

import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.zhika.zishi.R;

/**
 * Created by shi-02 on 2015/4/18.
 * 吐槽我们
 */
public class SaidUsFragment extends Fragment implements View.OnClickListener {

    private Button cancelButton;

    private View view;

    private Context context;

    public interface OnSaidUsInterface{
        public void remoteSaidUsFragment();
    }
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.said_us_layout,container,false);

        initView();

        return view;
    }

    private void initView(){

        context = getActivity();

        cancelButton = (Button) view.findViewById(R.id.said_us_cancel_button);
        cancelButton.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.said_us_cancel_button:
                ((OnSaidUsInterface)context).remoteSaidUsFragment();
                break;
        }
    }
}
